package MTT::Schema::Result::Alarm;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
extends 'DBIx::Class::Core';

__PACKAGE__->load_components("InflateColumn::DateTime", "EncodedColumn");

=head1 NAME

MTT::Schema::Result::Alarm

=cut

__PACKAGE__->table("alarms");

=head1 ACCESSORS

=head2 id

  data_type: 'integer'
  is_auto_increment: 1
  is_nullable: 0

=head2 name

  data_type: 'varchar'
  is_nullable: 0
  size: 42

=head2 cron_spec

  data_type: 'varchar'
  is_nullable: 0
  size: 42

=head2 status

  data_type: 'integer'
  default_value: 1
  is_nullable: 0

=head2 descr

  data_type: 'text'
  is_nullable: 1

=head2 date_run

  data_type: 'datetime'
  is_nullable: 1

=head2 subj

  data_type: 'varchar'
  is_nullable: 1
  size: 128

=head2 message

  data_type: 'text'
  is_nullable: 1

=head2 attachment

  data_type: 'varchar'
  is_nullable: 1
  size: 13

=head2 run_type

  data_type: 'enum'
  extra: {list => ["once","persist"]}
  is_nullable: 1

=head2 mail_to

  data_type: 'varchar'
  is_nullable: 1
  size: 256

=head2 mail_to_copy

  data_type: 'varchar'
  is_nullable: 1
  size: 256

=head2 mail_from

  data_type: 'varchar'
  is_nullable: 1
  size: 128

=head2 date_from

  data_type: 'datetime'
  is_nullable: 1

=head2 date_to

  data_type: 'datetime'
  is_nullable: 1

=head2 state

  data_type: 'integer'
  default_value: 0
  is_nullable: 0

=cut

__PACKAGE__->add_columns(
  "id",
  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
  "name",
  { data_type => "varchar", is_nullable => 0, size => 42 },
  "cron_spec",
  { data_type => "varchar", is_nullable => 0, size => 42 },
  "status",
  { data_type => "integer", default_value => 1, is_nullable => 0 },
  "descr",
  { data_type => "text", is_nullable => 1 },
  "date_run",
  { data_type => "datetime", is_nullable => 1 },
  "subj",
  { data_type => "varchar", is_nullable => 1, size => 128 },
  "message",
  { data_type => "text", is_nullable => 1 },
  "attachment",
  { data_type => "varchar", is_nullable => 1, size => 13 },
  "run_type",
  {
    data_type => "enum",
    extra => { list => ["once", "persist"] },
    is_nullable => 1,
  },
  "mail_to",
  { data_type => "varchar", is_nullable => 1, size => 256 },
  "mail_to_copy",
  { data_type => "varchar", is_nullable => 1, size => 256 },
  "mail_from",
  { data_type => "varchar", is_nullable => 1, size => 128 },
  "date_from",
  { data_type => "datetime", is_nullable => 1 },
  "date_to",
  { data_type => "datetime", is_nullable => 1 },
  "state",
  { data_type => "integer", default_value => 0, is_nullable => 0 },
);
__PACKAGE__->set_primary_key("id");

=head1 RELATIONS

=head2 alarm_params

Type: has_many

Related object: L<MTT::Schema::Result::AlarmParam>

=cut

__PACKAGE__->has_many(
  "alarm_params",
  "MTT::Schema::Result::AlarmParam",
  { "foreign.id_alarm" => "self.id" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 alarm_props

Type: has_many

Related object: L<MTT::Schema::Result::AlarmProp>

=cut

__PACKAGE__->has_many(
  "alarm_props",
  "MTT::Schema::Result::AlarmProp",
  { "foreign.id_alarm" => "self.id" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 alarm_switches

Type: has_many

Related object: L<MTT::Schema::Result::AlarmSwitch>

=cut

__PACKAGE__->has_many(
  "alarm_switches",
  "MTT::Schema::Result::AlarmSwitch",
  { "foreign.id_alarm" => "self.id" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 recipients

Type: has_many

Related object: L<MTT::Schema::Result::Recipient>

=cut

__PACKAGE__->has_many(
  "recipients",
  "MTT::Schema::Result::Recipient",
  { "foreign.id_alarm" => "self.id" },
  { cascade_copy => 0, cascade_delete => 0 },
);


# Created by DBIx::Class::Schema::Loader v0.07002 @ 2011-01-23 22:33:08
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4w8WAz9Zvr5tpmThRHkHTg


# You can replace this text with custom content, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
